<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width"/>
    <link href="/content/css/css.css" rel="stylesheet"/>
    <link href="/content/themes/base/jquery.ui.all.css" rel="stylesheet"/>
    <script src="/scripts/jquery-1.8.2.min.js" type="text/javascript"></script>
    <script src="/scripts/jquery-ui-1.8.24.js" type="text/javascript"></script>
    <script src="/content/gojs/1.8.13/go.js"></script>
    <script src="/content/js/flow2.js"></script>
</head>
<body>
<script type="text/javascript">
    //浏览
    $(function (){
        init();
        myDiagram.isReadOnly=true;
        loadFlow(${json!});
    });
    function nodeDoubleClick(e,node){

    }
    function linkDoubleClick(e,link){

    }
    /** 右键菜单*/
    function menu(name,e, obj){
    }
    function loadFlow(json) {
        if(json!=null) {
            var jsonModel = jsonToModel(json);
            myDiagram.model.nodeDataArray =jsonModel.nodeDataArray;
            myDiagram.model.linkDataArray =jsonModel.linkDataArray;
        }else
        {
            myDiagram.model.nodeDataArray=[Object.create(customNodeTemplate.Start), Object.create(customNodeTemplate.End)];
        }
        //var pos = myDiagram.model.modelData.position;
        //if (pos) myDiagram.initialPosition = go.Point.parse(pos);
    }
</script>
    <div style="width:100%; white-space:nowrap;">
        <span id="left" style="display: none; vertical-align: top; width:60px">
              <div id="myPaletteDiv" style="border: solid 1px black; height: 620px"></div>
        </span>
        <span style="display: inline-block; vertical-align: top; width:100%">
              <div id="myDiagramDiv" style="border: solid 1px black; height: 620px"></div>
        </span>
    </div>
</body>
</html>